package com.wd.tw.domain.dto.request;

import java.util.Random;

/**
 * @className: BasicPamra
 * @description: TODO 类描述
 * @author: liumingkun
 * @date: 2024/11/3
 **/
public class Basic {
    private String ver = "1.0";
    private Integer id;
    private Long time;
    private Integer nonce;
    private String token;

    public String getVer() {
        return ver;
    }

    public void setVer(String ver) {
        this.ver = ver;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Long getTime() {
        return time;
    }

    public void setTime(Long time) {
        this.time = time;
    }

    public Integer getNonce() {
        return nonce;
    }

    public void setNonce(Integer nonce) {
        this.nonce = nonce;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public static Basic getRandomBasic(){
        Basic basic = new Basic();
        Random random = new Random();
        basic.setId(random.nextInt(100)+ 1);
        basic.setNonce(random.nextInt(1000000000)+ 1);
        basic.setTime(System.currentTimeMillis()/1000);
        return basic;
    }
}
